package L1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class _070 {
    /**
     * 吃火锅
     */
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int sum =0;
        int chi =0;
        int index=0;
        boolean flag = true;
        String line = reader.readLine();
        while (!line.equals(".")){
            sum++;
            if (line.contains("chi1 huo3 guo1")){
                chi++;
                if (flag){
                    flag=false;
                    index = sum;
                }
            }
            line = reader.readLine();
        }

        System.out.println(sum);
        if (chi==0){
            System.out.println("-_-#");
        }else {
            System.out.println(index+" "+chi);
        }

    }
}
